# This is a configuration-only package that doesn't download source
THINGINO_KOPT_SOURCE =

################ JZ_MAC #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_JZ_MAC_V12),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_V12
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_V12)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_MODE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_RMII)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_JZ_MAC_V13),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_V13
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_V13)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_MODE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_RMII)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_JZ_MAC_CLK_25MHZ),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_CLK
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_CLK_25MHZ)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_JZ_MAC_CLK_50MHZ),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_CLK
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_CLK_50MHZ)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_JZ_MAC_INTERNAL_PHY),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_INTERNAL_PHY
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_INTERNAL_MAC_PHY_LED_SOFTWARE_CTRL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_INTERNAL_MAC_PHY)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_MAC_SPEED_LED_SOFTWARE_CTRL)
endef
endif

################ MMC #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC
	$(call KCONFIG_ENABLE_OPT,CONFIG_MMC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_BLOCK)
	$(call KCONFIG_SET_OPT,CONFIG_MMC_BLOCK_MINORS,8)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_BLOCK_BOUNCE)
	$(if $(BR2_PACKAGE_THINGINO_KOPT_MMC0_BOOT), \
		$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12), \
		$(call KCONFIG_SET_OPT,CONFIG_JZMMC_V12,m))
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_SDMA)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC0),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC0)
	$(call KCONFIG_SET_OPT,CONFIG_MMC0_MAX_FREQ,48000000)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC0_1BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_1BIT
	# 1bit needs the pb_4bit...
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC0_1BIT)
#	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC0_PB_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC0_PB_4BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_PB_4BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC0_PB_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC0_PB_8BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_PB_8BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC0_PB_8BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1)
	$(call KCONFIG_SET_OPT,CONFIG_MMC1_MAX_FREQ,24000000)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1_PA_4BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PA_4BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1_PA_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1_PB_4BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PB_4BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1_PB_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1_PB_8BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PB_8BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1_PB_8BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1_PC_4BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PC_4BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1_PC_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC1_PD_4BIT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PD_4BIT
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZMMC_V12_MMC1_PD_4BIT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_MMC0_BOOT),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC_BOOT
	$(call KCONFIG_ENABLE_OPT,CONFIG_EXT4_FS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_EXT4_USE_FOR_EXT23)
	$(call KCONFIG_ENABLE_OPT,CONFIG_LBDAF)
endef
endif
################ DWC2 #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_DWC2),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2
	$(call KCONFIG_DISABLE_OPT,CONFIG_HID_GENERIC)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_HID)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_ARCH_HAS_HCD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_ARCH_HAS_OHCI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_COMMON)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_SUPPORT)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_DWC2_OTG),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2_OTG
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_NET_AX88179_178A)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_NET_CDC_NCM)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_NET_CDC_SUBSET)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_NET_NET1080)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_NET_ZAURUS)
	$(call KCONFIG_DISABLE_OPT,CONFIG_USB_OTG_WHITELIST)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC2_DUAL_ROLE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC2_VERBOSE_VERBOSE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_GADGET)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_JZ_DWC2)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_OTG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_SUPPORT)
	$(call KCONFIG_SET_OPT,CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS,2)
	$(call KCONFIG_SET_OPT,CONFIG_USB_GADGET_VBUS_DRAW,2)
endef
endif
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_DWC2_WIFI_ONLY),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2_WIFI
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_ARCH_HAS_HCD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_ARCH_HAS_OHCI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_COMMON)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC2_HOST_ONLY)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC2_VERBOSE_VERBOSE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_JZ_DWC2)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_OTG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_SUPPORT)
endef
endif
################ UART #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_UART_UART0),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_UART0
	$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_JZ47XX_UART0)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_UART_UART2),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_UART2
	$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_JZ47XX_UART2)
endef
endif

################ RTC #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_RTC),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_RTC
# CONFIG_RTC_CLASS
# CONFIG_RTC_HCTOSYS
# CONFIG_RTC_SYSTOHC
# CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# # CONFIG_RTC_DEBUG is not set
# # RTC interfaces
# CONFIG_RTC_INTF_SYSFS
# CONFIG_RTC_INTF_PROC
# CONFIG_RTC_INTF_DEV
endef
endif

################ PWM #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_PWM),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_PWM
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_CORE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_JZ_TCU)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PWM)
endef
endif

################ SPI #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_SPI1_PB2),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_SPI1_PB2
	$(call KCONFIG_ENABLE_OPT,CONFIG_SPI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_SPI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_SPI1)
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_SPI1_PB_2)
endef
endif

################ SADC #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_ADC),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_ADC
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_JZ_SADC_V13)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_JZ_SADC_AUX)
endef
endif

################ WDT #########################
################ I2C #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_I2C_BUS1),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C1
	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C1_V12_JZ)
	$(call KCONFIG_SET_OPT,CONFIG_I2C1_SPEED,100)
endef
endif

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2
	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C2_V12_JZ)
	$(call KCONFIG_SET_OPT,CONFIG_I2C2_SPEED,100)
endef
endif

################ CIFS FS #########################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_CIFS),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_CIFS
	$(call KCONFIG_ENABLE_OPT,CONFIG_CIFS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CIFS_SMB2)
endef
endif

################ USB MASS STORAGE##################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_USB_MASS_STORAGE),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_USB_MASS_STORAGE
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_STORAGE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_SCSI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_SD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_STORAGE)
endef
endif

################ EXT2/EXT4 FS #########################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_EXTFS),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_EXTFS
	$(call KCONFIG_ENABLE_OPT,CONFIG_EXT4_FS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_EXT4_USE_FOR_EXT23)
	$(call KCONFIG_ENABLE_OPT,CONFIG_EXT4_FS_POSIX_ACL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_LBDAF)
endef
endif

################ DEVELOPER OPTIONS #########################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_DEVELOP),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DEVELOP
	$(call KCONFIG_ENABLE_OPT,CONFIG_SYSCTL_SYSCALL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_KALLSYMS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_KALLSYMS_ALL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BUG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ELF_CORE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ZRAM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ZRAM_LZ4_COMPRESS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_LOOP)
	$(call KCONFIG_SET_OPT,CONFIG_BLK_DEV_LOOP_MIN_COUNT,8)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_RAM)
	$(call KCONFIG_SET_OPT,CONFIG_BLK_DEV_RAM_COUNT,16)
	$(call KCONFIG_SET_OPT,CONFIG_BLK_DEV_RAM_SIZE,8192)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PROC_KCORE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_ARCH_KGDB)

	# Additional Config Options
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_FUNCTION_TRACER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_FUNCTION_GRAPH_TRACER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_DYNAMIC_FTRACE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_FTRACE_MCOUNT_RECORD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_C_RECORDMCOUNT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_TRACING_SUPPORT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_SWAP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_KERNEL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_LOCKUP_DETECTOR)
	$(call KCONFIG_ENABLE_OPT,CONFIG_LOCKDEP_SUPPORT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_STACKTRACE_SUPPORT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_KPROBES)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_KRETPROBES)
	$(call KCONFIG_ENABLE_OPT,CONFIG_SYS_SUPPORTS_HOTPLUG_CPU)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HARDWARE_WATCHPOINTS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEBUG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_RESOURCE_COUNTERS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
	$(call KCONFIG_ENABLE_OPT,CONFIG_FAIR_GROUP_SCHED)
	$(call KCONFIG_ENABLE_OPT,CONFIG_RT_GROUP_SCHED)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_PERF_EVENTS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_USE_VMALLOC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_FREEZER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_COREDUMP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_HIBERNATION_POSSIBLE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_SUSPEND_POSSIBLE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_DEBUG_KMEMLEAK)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_OPROFILE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_TRACEPOINTS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HOTPLUG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAS_WAKELOCK)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WAKELOCK)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE_IGMP_SNOOPING)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_ACTIVITY_STATS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NETWORK_PHY_TIMESTAMPING)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_NET_DSA)
	$(call KCONFIG_ENABLE_OPT,CONFIG_XFRM_ALGO)
	$(call KCONFIG_ENABLE_OPT,CONFIG_TRACE_IRQFLAGS_SUPPORT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_WARN_DEPRECATED)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NEED_PER_CPU_KM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_SECCOMP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_DYNAMIC_DEBUG)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PRINTK_TIME)
	$(call KCONFIG_ENABLE_OPT,CONFIG_RCU_CPU_STALL_VERBOSE)
	$(call KCONFIG_SET_OPT,CONFIG_RCU_CPU_STALL_TIMEOUT,60)
	$(call KCONFIG_ENABLE_OPT,CONFIG_EARLY_PRINTK)
	$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_IDE)
endef
endif

################ GADGET_SERIAL #########################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_GADGET_SERIAL),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_GADGET_SERIAL
	$(call KCONFIG_SET_OPT,CONFIG_USB_G_SERIAL,m)
endef
endif

################### AUDIO #### #########################

ifeq ($(BR2_PACKAGE_THINGINO_KOPT_DMIC),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_AUDIO_DMIC
	$(call KCONFIG_ENABLE_OPT,CONFIG_JZ_TS_DMIC)
endef
endif

################   NETFILTER   #########################
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_NETFILTER),y)
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_NETFILTER
	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_ADVANCED_ROUTER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_PRIVACY)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_ROUTER_PREF)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_ROUTE_INFO)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_OPTIMISTIC_DAD)
	$(call KCONFIG_SET_OPT,CONFIG_IPV6_SIT,m)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_NDISC_NODETYPE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_MULTIPLE_TABLES)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_SUBTREES)
	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6_MROUTE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
	$(call KCONFIG_SET_OPT,CONFIG_NF_CONNTRACK,m)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_PROCFS)
	$(call KCONFIG_SET_OPT,CONFIG_NETFILTER_XTABLES,m)
	$(call KCONFIG_SET_OPT,CONFIG_NETFILTER_XT_MARK,m)
	$(call KCONFIG_SET_OPT,CONFIG_NETFILTER_XT_TARGET_LOG,m)
	$(call KCONFIG_SET_OPT,CONFIG_NETFILTER_XT_TARGET_TCPMSS,m)
	$(call KCONFIG_SET_OPT,CONFIG_NETFILTER_XT_MATCH_STATE,m)
	$(call KCONFIG_SET_OPT,CONFIG_NF_DEFRAG_IPV4,m)
	$(call KCONFIG_SET_OPT,CONFIG_NF_CONNTRACK_IPV4,m)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_PROC_COMPAT)
	$(call KCONFIG_SET_OPT,CONFIG_IP_NF_IPTABLES,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP_NF_FILTER,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP_NF_TARGET_REJECT,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP_NF_MANGLE,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP6_NF_IPTABLES,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP6_NF_FILTER,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP6_NF_TARGET_REJECT,m)
	$(call KCONFIG_SET_OPT,CONFIG_IP6_NF_MANGLE,m)
	$(call KCONFIG_SET_OPT,CONFIG_DNS_RESOLVER,m)
endef
endif

####################################################
#This is required for BR to successfully concatenate the kernel options when used with modules
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_V12)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_V13)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_INTERNAL_PHY)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_1BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_PB_4BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC0_PB_8BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PA_4BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PB_4BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PB_8BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PC_4BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC1_PD_4BIT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2_OTG)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DWC2_WIFI)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_RTC)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_PWM)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_SPI1_PB2)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_UART0)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_UART2)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_CIFS)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_ADC)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_DEVELOP)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_GADGET_SERIAL)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_NETFILTER)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C1)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_USB_MASS_STORAGE)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_EXTFS)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC_BOOT)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_JZ_MAC_CLK)
	$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_AUDIO_DMIC)
endef


$(eval $(generic-package))
